package com.dm.hdfxxt.inmanage.controller;

import com.dm.hdfxxt.inmanage.service.InService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping(value = "goInBound")
public class InController {
    private static final Logger logger = LoggerFactory.getLogger(InController.class);

    @Autowired
    private InService inService;

    /**
     * @Description 保存入库信息
     * @Author zhangxue
     * @Date 18:29 2018/9/29
     * @Param
     * @retrun
     **/
    @RequestMapping(value="/saveInBound",method = RequestMethod.POST,produces = "application/json;charset=utf-8")
    @ResponseBody
    public Map<String,Object> saveInBound(@RequestBody Map<String,Object> param){

        return inService.saveInBound(param);
    }

    /**
     * @Description 编辑入库信息
     * @Author zhangxue
     * @Date 18:29 2018/9/29
     * @Param
     * @retrun
     **/
    @RequestMapping(value="/editInBound",method = RequestMethod.POST,produces = "application/json;charset=utf-8")
    @ResponseBody
    public Map<String,Object> editInBound(@RequestBody Map<String,Object> param){
        return null;
    }

    /**
     * @Description 删除入库信息
     * @Author zhangxue
     * @Date 18:29 2018/9/29
     * @Param
     * @retrun
     **/
    @RequestMapping(value="/delInBound",method = RequestMethod.POST,produces = "application/json;charset=utf-8")
    @ResponseBody
    public Map<String,Object> delInBound(@RequestBody Map<String,Object> param){
        return inService.delInBound(param);
    }

    /**
         * @Description  查询所有入库信息
         * @Author zhangxue
         * @Date 11:35 2018/10/30
         * @Param
         * @retrun
         **/
    @RequestMapping(value="/queryAllInBound",method = RequestMethod.POST,produces = "application/json;charset=utf-8")
    @ResponseBody
    public Map<String,Object> queryAllInBound(@RequestBody Map<String,Object> param){
        Map<String,Object> ResultMap = inService.queryAllInBound(param);
        return ResultMap;
    }
}
